fix lFormula for multiple terms per factor

also tweaking examples