Fixed bug in repeat logic
Fixed if statement flow
Added rotate