Some code cleanup based on solutions.