Removed some unnecessary tests; if you call `key` or `current` when `valid() == false` then it is undefined behavior anyway.