Add support to control dismissing the view on completion. closes #1