Fixes to entities and game loop

Added some additional commenting