basic js init, and correcting bad js files