Adds Docs. Code refactoring.