improved lexer and lexer unit tests