I already merged this PR (not pushed to GitHub yet, I'm playing with merging functionality inside the extension), can you open an issue/PR for this? My vote would be just put this code into a separate template file - I currently don't really care if we will have a lot of them but they will need to be separated into subfolders probably later if that happens.