Added a brute force gradient check, and weight regularization, and fixed some bugs with gradient calculation