starting docs
Refactoring and docs