comments added, derivative for a layer, transfer functions deriv changed