removes superfluous modules