grid code cleaning