Adding footer and some template conditionals