Finished implementing J1, J2, J3 and the S_* functions