Refactored Db to Database with a Registry