JavaScript improvements + local jQuery