moving php files to templates