Refactor 2d

Ready for merge.  Lookin at you, Caswell