tweaked templates and sms views
fixed recursion bug