Move group generator to lib