Refactored cleaned up unnecessary code.