Reorder javascript minification. Fix js errors in firefox.