Refactored

- Cleaned up code
- Properly documented via docblocks
- Fully OOP