Added element iterator to matrices.