Fixed some bugs, and added an accumulator and language acceptor