Added missing call to onDestroy()
Optimized pagenumber calculation.
Slight optimization to pagenumber calculation.
Fixed comment