Moving code to separate widget, cleaned out document.write testing code