DSSSM-314 #time 1h 23m Restructuring JavaScript functionality in order to prevent overflow under certain conditions