improvements to js for result component