General clean-up.  Improve handling of retrieving data