Use Strings.isEmpty() instead of Strings.empty()
Refactoring range and boundary traversal functions