so, now that we have this nice closure, what do you think of moving here all internal functions that can be moved (ie that use no var from the  `parse` or `generate` functions) ?