Finally finished debugging next and prev, which should work perfectly now