Beginning to implement header parsing function