Temporarily back out of refactoring changes to fix #11