Math updated

Added a bunch of functions needed for the game