Code cleanup

Cleaned up a lot of the code in the setup class