Adding regularization
Adding sigmoid gradient