Cleaned up the code

Removed unused/unneeded stuff