cleaned up the header code