A bit more refactoring work.