refactor raw fn's into Ctx impl; perf graph displays (partly)