Touchups and refactoring.