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

Maybe this should be called `fillBuffer` ? It behaves just like `require()`, but it returns a boolean instead of throwing. Thoughts?