Cleanup nxsurface.cpp