Refactor html.next()