Fixed twitchiness of physics simulation to an extent, refactored physics part into separate file, physics.js