Single stepping

Changes to allow single stepping of threads.