Adding stuff to the global init script should be avoided where possible. Given this looks to be quite a targeted bit of script, can this only be initialized when needed?