Cleaned up the code

Removed code that was not necessary any more