Fix up header and add comments