strip unneeded modules