Added abstract classes and base templates