Added l1 and l2 penalty.