Clean up the directory tree and add comments to the public interfaces.