Add TODOs.
Refactor and simplify code.