Refactor and expose schedulers. Add a dispatcher scheduler allowing the thread to continue to message pump.