Wrote solutions and cleaned up comments for rotating matrix.