Updated rotate functionality to be able to rotate multiple compounds at the same time.