Create the client template

Introduce the client template to keep the common code.