Refactor shoutbox.js