WIP: test suite and functional code for repos