diff --git a/docs/library_import_check.py b/docs/library_import_check.py
deleted file mode 100644
index 0ff2cb4fc1d7371fd453f1210f4d9e3a3574d967..0000000000000000000000000000000000000000
--- a/docs/library_import_check.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import sys,os
-import conf
-import commandcenter
\ No newline at end of file
diff --git a/python-api-src/lib_map_tools.cpp b/python-api-src/lib_map_tools.cpp
index 1734a8d742f5c2a5b96e0fe0ff57bbf5bb750de3..bfc196da9ad418af1c99995044380778fe49da98 100644
--- a/python-api-src/lib_map_tools.cpp
+++ b/python-api-src/lib_map_tools.cpp
@@ -22,6 +22,7 @@ void define_map_tools(py::module & m)
         .def_property_readonly("height", &MapTools::height, "The height of the map.")
 		.def_property_readonly("map_name", &MapTools::name, "The name of the map.")
         //.def("terrainHeight", &MapTools::terrainHeight, py::const_)
+        .def("terrainHeight", &MapTools::terrainHeightFromCoord, "x"_a, "y"_a)
         .def("draw_line", py::overload_cast<const CCPosition &, const CCPosition &, const CCColor &>(&MapTools::drawLine, py::const_), py::arg("start"), py::arg("stop"), py::arg("color") = sc2::Colors::White, "Draws a line with the given color between to two points.")
         .def("draw_tile", py::overload_cast<const CCTilePosition &, const CCColor &>(&MapTools::drawTile, py::const_), py::arg("tile"), py::arg("color") = sc2::Colors::White, "Draws an outline with the given color to the given tile.")
 		.def("draw_box", py::overload_cast<const CCPosition &, const CCPosition &, const CCColor &>(&MapTools::drawBox, py::const_), py::arg("top_left"), py::arg("bottom_right"), py::arg("color") = sc2::Colors::White, "Draws a box with the given color from the top left corner to the botom right.")
diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp
index 2348de060cbcd4ba4de37f4c695e7b5b33809776..9ac8f65eb453f1a4173c5a20ec22263420038d68 100644
--- a/python-api-src/library.cpp
+++ b/python-api-src/library.cpp
@@ -130,6 +130,7 @@ PYBIND11_MODULE(commandcenter, m)
 		.def("on_step", &IDABot::OnStep, R"(The on_step function in the IDABot class is a method that is called every game step (or frame) during a Starcraft II match. 
 		This function is crucial for implementing the bot's logic that needs to be executed continuously throughout the game. 
 		It's where the bot evaluates the current game state, makes decisions, and issues commands to units.)")
+		.def("on_game_end", &IDABot::OnGameEnd)
 		.def("send_chat", &IDABot::SendChat, "Sends the string 'message' to the game chat.", "message"_a)
 		.def("get_all_units", &IDABot::GetAllUnits, "Returns a list of all visible units, including minerals and geysers.")
 		.def("get_my_units", &IDABot::GetMyUnits, "Returns a list of all your units.") 
@@ -160,6 +161,7 @@ PYBIND11_MODULE(commandcenter, m)
 		.def("upgrade_gas_cost", &IDABot::UpgradeGasCost, "Vespene/gas cost of researching the upgrade.", "upgrade"_a)
 		.def("upgrade_research_time", &IDABot::UpgradeResearchTime, "Time in GameLoops to research this upgrade.", "upgrade"_a)
 		.def("effect_radius", &IDABot::RadiusEffect, "Size of the circle the effect impacts.", "effect"_a)
+		.def("save_replay", &IDABot::SaveReplay, "Saves the game as a replay", "path"_a)
 		.def_property_readonly("base_location_manager", &IDABot::Bases, "An instance of the class :class:`commandcenter.BaseLocationManager`. ")
 		.def_property_readonly("tech_tree", &IDABot::GetTechTree, "An instance of the class :class:`commandcenter.TechTree`.")
 		.def_property_readonly("map_tools", &IDABot::Map, "An instance of the class :class:`commandcenter.MapTools`.")
@@ -171,6 +173,9 @@ PYBIND11_MODULE(commandcenter, m)
 		.def_property_readonly("max_supply", &IDABot::GetMaxSupply, "How much supply we can currently use.")
 		.def_property_readonly("gas", &IDABot::GetGas, "How much gas we currently have.")
 		.def_property_readonly("current_frame", &IDABot::GetCurrentFrame, "Which frame we are currently on.")
+		.def_property_readonly("score", &IDABot::GetScore, "The current score.")
+		.def_property_readonly("player_result", &IDABot::GetPlayerResults, "The match result for the player.")
+
 		.doc() = R"(This is a stripped-down version of a bot. It contains all available managers and basic methods.)";
 
 
diff --git a/python-api-src/library.h b/python-api-src/library.h
index 3f9114d0685218dec0f51e838031976f622c5709..9fb76f35e9de7251f9a3d6f64875498d7e182e94 100644
--- a/python-api-src/library.h
+++ b/python-api-src/library.h
@@ -60,6 +60,15 @@ public:
             OnStep
         );
     }
+	void OnGameEnd() override
+	{
+		PYBIND11_OVERLOAD_NAME(
+			void,
+			IDABot,
+			"on_game_end",
+			OnGameEnd
+		);
+	}
 };
 
 
diff --git a/src/IDABot.cpp b/src/IDABot.cpp
index 27ea3d8f45963e90b70936d65fa1799cfaef3867..4547b39f42c3a219e6c050580f85e2c6cef5b4b3 100644
--- a/src/IDABot.cpp
+++ b/src/IDABot.cpp
@@ -1,5 +1,6 @@
 #include "IDABot.h"
 #include "Util.h"
+#include "sc2api/sc2_score.h"
 
 
 IDABot::IDABot()
@@ -158,6 +159,10 @@ int IDABot::GetGas() const
 
 Unit IDABot::GetUnit(const CCUnitID & tag) const
 {
+	if (Observation()->GetUnit(tag) == nullptr) {
+		return Unit();
+	}
+
 	return Unit(Observation()->GetUnit(tag), *(IDABot *)this);
 }
 
@@ -384,3 +389,24 @@ float IDABot::RadiusEffect(sc2::EffectID effect_id) const
 {
 	return Observation()->GetEffectData()[effect_id].radius;
 }
+
+float IDABot::GetScore() const
+{
+	return Observation()->GetScore().score;
+}
+
+const sc2::GameResult IDABot::GetPlayerResults() const 
+{
+	auto res = Observation()->GetResults();
+	for(int i = 0; i < res.size(); i++)
+	{
+		if (res.at(i).player_id == Observation()->GetPlayerID()) return res.at(i).result;
+	}
+	std::cout << "The player can not be found" << std::endl;
+	return sc2::GameResult::Undecided;
+}
+
+bool IDABot::SaveReplay(const std::string& path) 
+{
+	return this->Control()->SaveReplay(path);
+}
\ No newline at end of file
diff --git a/src/IDABot.h b/src/IDABot.h
index 84e38978f0c93f1328d5a6506b4f8495e0b7d5d8..22f5736eaa4022e31e805e2419249fbd1359c0d9 100644
--- a/src/IDABot.h
+++ b/src/IDABot.h
@@ -93,6 +93,11 @@ public:
 	float UpgradeResearchTime(sc2::UpgradeID upgrade_id) const;
 	float RadiusEffect(sc2::EffectID effect_id) const;
 
+    float GetScore() const;
+
+	const sc2::GameResult GetPlayerResults() const;
+
+	bool SaveReplay(const std::string & path);
 
 
     // Not needed, just convenience functions
diff --git a/src/MapTools.cpp b/src/MapTools.cpp
index 23d5b210e40f2654fa6514fb538d0d7688d8d1e4..46e75caf847266768652bd1599013e9acb9909a7 100644
--- a/src/MapTools.cpp
+++ b/src/MapTools.cpp
@@ -280,7 +280,7 @@ bool MapTools::isPowered(int tileX, int tileY) const
 #endif
 }
 
-float MapTools::terrainHeight(float x, float y) const
+float MapTools::terrainHeightFromCoord(float x, float y) const
 {
     return m_terrainHeight[(int)x][(int)y];
 }
diff --git a/src/MapTools.h b/src/MapTools.h
index b5490addd247fc22478e157ebfbd864f9d010306..8cd523e3e5048a6987c8f5a4c79d4cdfce9f545e 100644
--- a/src/MapTools.h
+++ b/src/MapTools.h
@@ -47,7 +47,7 @@ public:
     int     width() const;
     int     height() const;
 	std::string name() const;
-    float   terrainHeight(float x, float y) const;
+    float   terrainHeightFromCoord(float x, float y) const;
 
     void    drawLine(CCPositionType x1, CCPositionType y1, CCPositionType x2, CCPositionType y2, const CCColor & color = CCColor(255, 255, 255)) const;
     void    drawLine(const CCPosition & p1, const CCPosition & p2, const CCColor & color = CCColor(255, 255, 255)) const;
diff --git a/src/Unit.cpp b/src/Unit.cpp
index 71b10ef8e19ee32925625d356d7d051eaf2017f6..ca4d720c9c8ad044f33df281c5201dbc41183560 100644
--- a/src/Unit.cpp
+++ b/src/Unit.cpp
@@ -1,5 +1,6 @@
 #include "Unit.h"
 #include "IDABot.h"
+#include "sc2api/sc2_gametypes.h"
 
 Unit::Unit()
 	: m_bot(nullptr)