Debug utils/back-end; revise template iteration.