Added Jacobian to models

Rewrote models to separate linear and nonlinear parts. Also removed
sigmoid weight to outside function, this aids in implementing new
function S_derivative. Pass sigmoid parameters as arguments.