Fix build
Fix segfault
Clear code
Change dummy header values into real ones
fix CFLAGS processing in makefile