move out tpls to files