update functional tests, they are still broken
fix mem issue
fix mem issue
switch lex to flex