Improved the spawn/kill-scripts