Small improvements of equals methods