Merge pull request #1 from timpx/master

changename of rmain to main_surface to prepare for region pipeline