Replaces unique_tasks and uniques_waiting with unique_ready_tasks
fix some test cases, remove unnecessary code, adding loggin