Created parse_header function.