Add headers

* Abstracted logic into libraris
* Added specs
* Added header support to upload