Implemented correct equals() and hashcodes on core types, added unit tests to verify behavior.