I think you probably need specific help from a Dreamweaver forum to get your templates back into shape as we don't have that many experienced DW users here at the moment. I have used the DW templates (about 10 years ago) and they were always a pain and I gave up using them. It's much better to use 'includes' as Ralph suggests and much easier to manage.
You could detach your pages from the template (but I'm not sure if you can do this in a batch). You could then just use DW search and replace and update all 50 local pages with the new code in one go.
However, it may be better for you to start from scratch again and build the pages with includes and get it back into a manageable position again or you will have this problem every time you do something.