Refactor MouseDetector; properly implement observer pattern