DOC and Refactor

- Doing DOC
- Simple refactor