various work to make loop/punch display work better (including fixes for bugs present in master also)