Added some functionalities to the S5 example of slides