Removed unused globals in jshint directive
Fix bug with appendNextPage