Reduced waiting time (Thread.sleep) on some of the code.