Edits to make likelihood compatible with TE and EE inputs.