Moved equality comparison between class objects into its own mixin class