Update docs and some refactoring