Cleaned up a loooot of code