Fixed a bug in repetition AST.  More cleanup