lets make this longer bur easier to grasp, something like:

```
var previousLeaf = this.getCurrent().getActiveWindow().getPrev();
if (previousLeaf) {
  return previousLeaf;
}
var previousGroup = this._stack[this._current - 1];
if (previousGroup) {
  return previousGroup.getLeafWindow();
}

return undefined;
```

same goes for getNext :)