moving script block into body element
adding console for IE9