relocate files, add http/template code