Refactored repository constructors and fixed all unit tests. Repositories now have no mutable state (other than what is in the DB that they represent, of course)