killed a couple of small bugs, refactored event detection stuff into ui init
killed a couple of small bugs, refactored event detection stuff into ui init

Halfnhav/appframework,Halfnhav/appframework,Halfnhav/appframework