Adjust Appender a bit and do a bit refactoring on the Lexer.