Fix templating with quotes and comments