Adding headers and cleanup.