Extract utils.merge() and use in providers