Tweaking js refs