Implemented input for mice; bug fixes