Made equals() more elegant