Added logistic activation function.