The connection target involves a type and a union of pointers, let's make the code cleaner using simple wrappers.