Clean up more duplicate code.