remove nested spans and replace with parens for actions