refactored for integration
Merge pull request #15 from pgreenwood/master

refactored for integration