Fixed __pow__ and added documentation.