Replaced fix class type through instancetype and used self in static methods instead of fixed class reference to enable improved subclassing