fix arity 3 sub, misc edits
use element-multiply for scalar factors