Refactor 2d

Ready for merge.  Lookin at you, Caswell
should be `keys = list(six.iterkeys(self._data))`