Update documentation, will add more test coverage based on this document. [ci ignore]