Refactor IE and minify js