Added directive and templates