This is run only when a page changes, so I am not sure that speed optimization is necessary. So I prefer cleaner code. But I have no strong opinion here. The only thing you have to be careful is that all dependencies are registered you want them to be registered.

I think I mix styles. If I would use `currentGroupId` in this function to compute something, I would probably store it into a variable. Here I am just passing it on. See [examples here](https://github.com/peerlibrary/peerlibrary/blob/master/client/publication.coffee#L353) and [here](https://github.com/peerlibrary/peerlibrary/blob/master/client/publication.coffee#L371). I do not have a clear style here. Just do whatever feels best.