move updatePrefix() to main.js so it only gets called when prefix is changed