Update UI appropriately when the application first starts and when the current document changes