Add prev/next control logic