Remove redundant commands and imports.