reorganizing code layout
template upload finished
template uploads and photo uploads in place