This Consultancy Agreement expressly sets out that any intellectual property created by the consultant (or their representative) is owned by the client or is held on trust by the consultant for the client. You can choose whether the client must pay the consultant in full before ownership is transferred to the client.
The client is protected from any legal claims arising from the intellectual property by an indemnity from the consultant.