Small cleanup to object statistics gathering code