remove useless imports and variables