Makefile modified so it compiles with optimization and NDEBUG now
Created check_config, so all the config check will be done in one point.
Added UDP support
Changed all fprintf(stderr,...);exit(1) to macro fatal()