At the top of this function we can do
```
if (options.level === undefined) {
  options.level = {};
}
```
then lines like `options.level ? options.level.showPreviousLevelButton : undefined` become just `options.level.showPreviousLevelButton`