cleaned up code, added wallscript and added more actionStates

Added wallScript, for reaching a dead end. Added more actionStates,
which are the states the player can be in. Other commenting and cleaning
up of code.