Cleaned up code a bit.  Neater to read.