Refactor dashboard template.