more cleanup...removing magic numbers, adding bounds checking for player position