implemented an event-system for the buttons as well as added an option pane