Changed comparisons of class to support more rubies. Changed Class === instance to Class == instance.class