fixed up unit tests added comments to db connection.