Refactor filters, resolvers and producers into factories