minify and fix ifdefs