If I read correctly, you are installing new siding over old cedar siding??? That is a bad start IMHO. The old siding should be removed before anything else is done, including the windows. And you need to be careful what type, if any, foam you add to the outside. If it will not let moisture pass from the inside out, you will be trapping moisture in the wall cavity, NOT GOOD. Often, what you install may depend on your climate. Check local code.