Optimizations and cleanups.
Problem 60.