linear programming overhaul (includes closing of memory leaks by implementing proper destr and copy constr)