This block should probably move back below to keep the function consistent. Currently, the function effectively does:
```
// Unregister existing subscriptions
...
// Update editorSession variable & button enable state
...
// Register subscriptions to the new session