Fixes #24; Adds support for specifying maxiter via CLI or API