Read & apply the row limit. Minor refactoring.