Restructure step 7 phi summation to streamline inner loop
Protect against overflow
Documentation updates