refactored internal build tools
improve performance of rewrite-assets tasks by skipping unchanged files
code cleanup