remove unused assignments and imports based on pylint suggestions