Move kill/restart/stop logic to lib/weaver.js