Solve problem 5 and clean up names.