Restructure template files into subdirectories depending on page.