Finished rough draft of header generation

WARNING
Pixel data still not passed

Probably lots and lots of errors