Code reformat, minor refactoring.
Refactored operations. Improved tests. Added Pow().