Cleaned up problem 11 code a little.