Add capability to stop process, some bug fixes