refactoring, fixed typos in docs