Cleaning

Cleaned up a good portion of the code.