Added Pow and changed Sqr functions.