revert some refactoring changes