Add main template
Fix substitution
Actually use proper variable
Still need substitute