Added collision detection and keyboard movement