Remove some redundant imports
Fix up deprecated functions