What do you guys think about isolating big JS blocks like this into separate templates and including them to avoid the duplication?