Removed some useless printlines, and made a thread that was consuming the cpu sleep