Plugged holes in do_transpose(), added test routine for it