refactored mouse and keyboard events, moved events out of factories and into components, setup init function on components