Documents are updated & some refactoring

Documents are updated & some refactoring