Some change to the foreground.js script