general structure improved, added mouse and keyboard handlers as a temporany mocks