Fix killing of processes, split control scripts