Encapsulated lexer and updated calling functions accordingly.