Merge pull request #1 from andrewor14/cleanup

I am merging this. I will take one more detailed look in the context of my original changes in the main PR.