Converted more stuff to multidim

The tests pass now.