Some more recycling and refactoring.