Updating application state