Fixed shifts by varaibles. Added rotate test code to src/regression