Added setting to close app when last document closes.