Monitor document changes.
Refactor options parsing
Refactoring