Cleaned up newlines and removed duplicate 'run-sleep' code