Cleaned up scGetPageSize util global function.