Cleanup start/stop code