Major overhaul of the cflags and cleanup of all unneeded and redundant options