Fixed problem with indentions. Got rid of gratuitous output.
Added a tear-down section for the selected surface.
Factored out the section for tearing down surfaces.