Refact templates, removed desnecessary inheritance