Cleanup and a miniscule refactoring.