Refatored generator.impl to generator (#5)