first pass flxemitter refactor