Fix zabbix_template :create
Factor common stuff into a library; Clean up application resource