Added settings. Added srand. Added interruption detection for stop() slot.