Clean up array size calculations