Rewriting to be more thorough about the repo data and always storing a copy of the data in the db.