moving html into templates