remove useless imports and code lines