Removed unneeded and cleaned up code.