Minor cleanup on smart escape

1. Rename vars to state
2. Do not escape things we don't know
3. Use :{} instead of :"{}"