Add provisioning code back with commented out parts. Certificate management code is commented out, but goes through the path