Made some changes to the click functions of the js file