Did some refactoring to remove the ability to start a thread and sleep from core's public API.