Changed return values to self.__class__