Picking JavaScript improvements