Did some simple cleaning and moving things into methods, just pushing so I can play with this dialog box thing