moved getinstance to mpi.factory, created get mpi and sched and options function in the bin. so we can test easier
added testcases