Updated incomplete beta code to calculate power terms in a more reliable way. Added explanatory comments describing what's going on.