Added rotation to samples
Rotation and closing works but extremely slow