Added a transpose method to the utils class.