refactor -- doc and style