History added, and made it loop. Also some desugaring.