Strip whitespace and reformat docs