How to apply a schematic without air blocks?

Here is code I wrote that shows how to do mostly what your trying to do