Minor changes to speed up code.

Added minor changes to the way variables are accessed to speed up the
code. Tried to refactor away complex array lookups in the core game code
to speed up rendering where possible.

This is all in an attempt to get the game to run decently on my wife's
cellphone.