Alternative method of comparing objects

The fix for #11 seems a bit over the top, and using a simple `==` should do the same (the tests agreees).