Added next and previous functionality to GUI