Reverting earlier refactoring