refactor minifyHtml
comply with standard building the files object dynamically