Fix errors in js files and make it runnable.