Adding docs
Refactoring