Improved looping. Models Cookie Clicker, but better