updated to account for headers on new .belns files and presence of templates