new template directory structure and other cleanup