Added self references to the class templates