raises TypeError if tmpl is none
changed serialization from pickles to json (unicode error #13)
test updates