Add documentation and minor code-refactoring

`Initialize the`