Inserting code from grayscale template