Scan, compile and minify functions