Checks if there is any "last" page when trying to set END_INDEX
Remove unused config options
Clarify comments
Merge branch 'dev'