Small generic cleanup of various things.
Remove unused references.