Improve TODOs, run errcheck and eliminate use of panics where possible

Panics should now only be used for code paths that I think are unreachable