Added some error handling for template generation
Parsing slider and converting to json