code cleanup in preparation for issue #12