fix imports and variables

I often see commits have unused import. Do you have leave on purpose?