Added basic loop unwinding.