added iteritems to layout_opts iteration

Closes #317