No need for passing object by reference.

We only support PHP5, so we can get rid of the passing by reference.
Reformat the code
Bugfix: Widget would not keep checked categories

Closes #3