Move useful functions to backgroundnoise.js