Implemented Reference class for persisting reference data, and added some
simple database tests.