restructure the template directory