doc: deep restructuring and formatting