Added half-done RefreshNext() function.

Unfortunately it's not working right now, it needs the setStates() to be
functional.