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

refactored for integration