Tested J and Jt for b and e formulations. Generalized code so it is easy to reuse. New receiver types.