Improved code

No more collision handling errors, constant rate of movement,
improved mouse handling.