Add cyclic group abstraction, with test code. Separate off exponentation