Refactor to new class
Merge pull request #2 from Daytron/Refactored

Refactor to new class