Added quit item to main menu.

Closes #340.
Added Promise error handling where it was missing.

Fixes #338.