Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily. (bzr r8422)