Add headers and cleanup format