Removed unecessary code and cleaned up documentation