Refactor all gui stuff, add gui elements, better event handling