index JS cleanup