first pass cleanup of repo branch code