changed implementation of equals() and fixed minor glitches in pile_onto()