WIP refactor codegen
finishes data massaging, ready to start working on actually generating files