removed mosek stuff, cleaned up main function