Move category relationship processing to an action.

closes gh-282