Change next/prev finding logic to stey in relevant section