Code changes complete to allow for automatic ES mapping template insertion

Edits made per @jordansissel