Updated generic JS functions of Front-end