refactor enum and closure names