First round of doc creation refactoring