removes unnecessary modules