Simplified mesh surface extraction

I ran a tool for calculating code metrics and noticed that mesh surface extraction was by far the worst thing I've written concerning complexity and nesting depth, so I streamlined it a bit.