Add function comment.
Fix warning about argument which is not provided.
Move relationship handling into the batch object...

...  That is, out of the preprocessor itself.