bunch of changes to a) deal withrepos better b) be more efficient c) have clearer output