Transform example modules to objects

Guice allows installing modules twice if they are equal.
If there is no reason why the module has to be a class
and have many different instances, it's better to make
it an object.