adding code to merge markers into reference surfaces.