Organizing split surfaces in order

Cross-posted on the old forum. Please post some code next time.