cleaned up code
Merge pull request #48 from hoylemd/refactor

cleaned up code