Refactor the Doc