Clean up the code
Merge pull request #473 from timschofield/develop

Clean up the code