Refactor 2d

Ready for merge.  Lookin at you, Caswell
don't need this function