Making the Lexer module pure