Use the existing provisioning agent instead of creating a new one.

Additonally fix some warnings.