Get rid of ``DeprecationWarning``

Also remove unused import.