Finished implementation of the DAO layer.