part way through refactor
moved from closed actions to type mappings, needs work