Ultimately, Darth Sidious, masquerading as Chancellor Palpatine, orchestrated the Clone Wars. He ran both sides through his position as the head of the Galactic Republic and through commanding his apprentice, Count Dooku (Darth Tyranus). After the Sith invasion of Naboo, Jedi Master Sifo-Dyas secretly requisitioned the clone troopers from the Kaminoans, recognizing that the Republic would eventually need a highly-trained army. He was given the funds by Damask Holdings magister Hego Damask (in reality, Darth Plagueis). Around the same time, Sifo-Dyas' close friend, Dooku, fell from the Jedi Order, turning to the Sith. His first quest was to kill his old acquaintance. The Kaminoan cloners were unaware of Sifo-Dyas' death until Obi-Wan Kenobi told them in Attack of the Clones, almost ten years after he first contacted them. With Sifo-Dyas dead, Dooku - on Palpatine's instructions - continued to keep the clone army a secret, eliminating all records of Kamino from the Jedi archives. He then paid off the Kaminoan leadership (Lama Su, Nala Se) to implant the inhibitor chips in the clones' brains, preparing them for Order 66. Exactly how much the Kaminoans knew is still a little unclear. The Confederacy of Independent Systems, a group led by ex-Jedi Count Dooku that broke away from the Republic, also formed their own army of mass-produced battle droids. While inferior to clones, they had greater numbers. Since Dooku was also Sidious' apprentice, the battle droids also technically fought for him. On Geonosis, Obi-Wan Kenobi uncovered a battle droid factory before being captured by Dooku. He, Anakin, and Padme held their own in a Geonosian arena for a time before Jedi knights arrived to help them. The Separatists gave their battle droids the command to attack the Jedi and pushed them back to the center of the arena. Just before initiating the final devastating attack wave, Yoda arrived with the clone troopers, saving the surviving Jedi. Although they were suspicious of the clone troopers' origins, the Jedi felt they had no option other than to rely on them, as they had no army of their own. They would even discover that Darth Sidious was behind the army's creation towards the end of the war, but by then, it was far too late to do anything to stop Order 66.