Refactor Rinket.Db