More refactoring
Merge pull request #3 from joshtombs/Refactor_Code

More refactoring