Test grid-master encoding (remove debug code)