memory fixes, LEX

- some memory initialization
- LEX compilable
small fixes and cleaning for LEX
test vector file fix

- project header now outputted to file only when needed