Add support for headers

Addresses #5.