Refactor documentProvider (now action)