Reviewed Documentatin input filter

- CS fixes
- Refactored logic to reduce nesting of cases, to break early when
  possible, to flatten error messages, and to provide context in error
  messages.
- Updated unit tests to add keys to all data provider sets and to sync
  expected error messages .
CS fixes

- trailing whitespace, EOF endings