Re-implement iterate using extracted libraries.

Closes #75.