Merging changes from work machine (Minor changes + rewrite of template uglify function