Fix a bug in indexOf(). Add indexOfElement() and request().

the bug is that this can cause start to go down, when it's only intended to go up!