Switch Lex to use a channel rather than an array