remove some dead stuff
Add events to render loop
remove debug, placing into a plugin