Fix some exported private type warnings.
Fix a deprecated phase warning.
Remove some unused fields.
Mark some unused fields.
Remove some deprecated into_owned calls.
Merge pull request #2762 from Ms2ger/warnings

Fix some build warnings. r=me