Cleaned up the code

Removed unusued/unneeded stuff