The clicking sound is typically from worn pedals, bottom bracket, or the motor cassette tower. I just replaced my bottom bracket on my Electric Electra Townie (uses the same motor as the CCX) and that solved the clicking.
For help replacing the cassette tower, see this link...