cleaned up template code, use new styles