Distributed vector cleanup

This cleans up the implementation of distributed vector. Iteration is now much more performant.