Finally got next() and prev() working.