Some doc code cleanup [skip ci]