better treatment of linear factors (fully factorized within and outside of gradient calculations)