split into ns
handle quit
fixed double start/stop bug