shift module name parsing out of generator
shift top-level parsing out of generator