Cleaned up RearrangeMatrix