Add L1 and L2 regularization, hopefully working.