Bug fixes to repos, unit tests passing