Cleaned Code

Deleted unused code, reformatted a lot.
Overall nicer looking code