Added fully functional inheritance of -sharedInstance to subclasses (with help of instancetype type).