Updated templates and fixed ES samples