Rename template event file
Minor JS refactoring
Fix broken image replacement