Implemented basic classes and template replacement