better collision detection, fix rendering issue when obstacles disappear, fix moving up and down in firefox with arrow keys