refactored magic numbers from gamestate
updated math library