Formatting and Dialogs

Updating formatting of code and adding dialogs in catch blocks. More to
come.