Added more context to the <title>
simplied if statmenet.
rearraged template if statements.