Started to refactor doc access to service layer.