Refactor direct body document parameters.
Implement function operations and cover them with tests.