Minor speed improvement to the class power functions