updates to main template and breaking down into layouts