Fix up indentation and add some documentation.