Added looping control
Removed progress counting (was ridiculously inefficient)
Added autorotation support