wip towards minimizing closure-state
bug fixes