Cleaning up the solution to 49.