Moved sleep to own file