defensive markov programming and stripping out whitespace before parens