Implementing the GUI and Logic