CLN/TST: Mark areas that need to be improved throughout.

* Add TODOs to places that are clearly not tested (b/c they had undefined names) and fix the undefined names
* Add TODOs to unused names.
restore orig_header for now
CLN: Cleanup unused assignments in core/index
CLN: Mark code paths that are used to check input to functions (and leave in)
Revert encoding removal (fixup me!)
CLN: Remove unused `rvs` assignment.

Does not appear to ever have been used, even when class was first
created. Not sure what it was meant to be for.