Code Cleanup

Removed a bunch of redundant stuff from the code.