used JSSnippets so the asset is not duplicated, escaped error message only once (with mustache), fixed passing id from data-map-id to JS