Refactor 2d

Ready for merge.  Lookin at you, Caswell
The code and the docstring don't quite match.