code clean up
Merge pull request #300 from conorfennell/master

code clean up