Part of documentation.
Documentation and minor code changes.

Needs testing for regressions.
Finished documentation. Minor changes.

Needs testing and implement a few TODOs.