file headers and clean up