refactor and extra functionality

game loop
new movement logic
Merge branch 'master' into Emergent