Cleaned source code and improved perfomance with mousemove