Fixing some things

* added Engine pointers to most things
* cleaning up event handling