refactored for clarity. now handles default, additional, and replacement templates as long as the names are the same