Downsize surface.cpp code some more