Changed Square2D to Quad2D. Updated ExecuteInEditingMode stuff.
Fixed memory leaks relating to materials.