converted all template files to spaces
streamlined some patterns