Write documentation
Write documentation and refactoring