Added isEqual static function and some minor code improves