improved templates and made style consistent