Preparing to move sleep functions from here
Removed sleep related code