Equals(), hashCode() implemented plus minor fixes