First pass at refactoring
Merge pull request #2 from KieranLafferty/Refactor-Simplify

First pass at refactoring