Fix documentation and reformat