Started work on the core library

Added some mouse event handlers.