Reorganize headers and expand documentation.