First portion of factory changes for issue #151.