refactored code to readability, testing, docs, maintainability
Merge pull request #6 from andrewjmead/refactor

refactored code to readability, testing, docs, maintainability