Made some changes. Corrected one implementation. Ran numerical tests to ascertain some optimal variable choices.