Removes dead code as a prereq for API work

Unused imports and members, some deprecations.
Shout if you see anything controversial.
Same as comment a few lines before.