add headers, cleaned up lex file some