Added working next/previous buttons.