Remove useless type declaration.
Fix rest removal.