Performance upgrade
Add better variable escaping