Refactored

Removed unnecessary code, simplified, reworked