Refactor code, try to implement transactions to support .*(.*)*\1
need to implement cleanTape function -> adding sequence of transactions to clean the tape n
need to implement cleanTape function -> adding sequence of transactions to clean the tape n