Moved the mouse functions to a separate file, mouse-interface.js.