reorganize surface plotting code
finish reorganizing