refactor of VarExp code generation, with extensive notes in README