Remove unused import.
Remove deprecated API use.
Fix quality flaws.