Cleaned up header parsing.