Removed sleep calls and added more debugging