Two changes: 1) Add option to save the minimised cfg; 2) Add license header