Refactor 2d

Ready for merge.  Lookin at you, Caswell
keeps IDEs happy