Small next sequence refactoring
Updated documentation