Fix geoemtry type regexs (ref #20)
Cleanup and fix templates (ref #20)