Removed and cleaned up the code