Changed the order of methods
Some changes to equality test