Revert some changes from WIP version.