Cleanup of old files.
Replaced rotations function with faster version