working in concert with france 's king philippe iv , the pope devised an ingeniously planned sting operation to quash the templars and seize their treasure , thus taking control of the secrets held over the vatican .