remove unneeded imports, edit math to resemble mathprog