put functors and transes in separate file
cleanup and reorg