Refactor .next to .next_ to match naming convention for builtin python attributes