Issue 242 prep

Some small refactoring/cleaning in preparation for fixing #242