Refactored testing of hashCode equals method. Minor clean up in production code.