Cleanup code
Add some default variables
Make methods for a lot of the logic, better organized