Created a large portion of the GUI, plus some random refactoring.