Ready for review #2. I addressed all of the issues you pointed out and cleaned up the code a little.