Add init template for generated modules, + other small changes.