Added forward prop., backward prop., and gradient checking routines.