Fixed next() and prev(); they are no longer recursive.