Increased num rows per batch to 500, turned number into a variable