Refactored l1 minimization in l1min.py