Refac: spooky.js, TODO: extract restart method from spooky.js as util script