Factor out common parts of the pure and LVar CFA app