Add function to retreive headers as an association list

Closes #42
Closes #38 (maybe)