Started rewriting thread and event system
started working on GUI again