We can simplify some of the repository code since there's now two separate functions for base/expansion repositories. Added tests to make sure reading doesn't regress like it did before.