Fixed unused imports left over when encode was moved.