Added Candidate type;
Moved global to Pe and made Pe global;