Fix variables, group into variables

Cleaning up everything so I can start actual work on the code.