Constructor, equals and hasCode generation added.