Refactored lexer to support line number data