Improved type checking warning messages

Also fix the recognition of empty template parameter list
Use simplejson instead of json whenever possible

simplejson is faster and more importantly, gives readable diagnostic messages