Removes unnecessary modules