Added minify function