Correct TODOs and modified code
correct TODOs