Resolve remaining TODOs.
Remove stale code.