remove head and reindent (also add headers)