Tried to implement commutativity in .equals()

Also added config parameter to .equals()