Logic bug fixed
Implemented basic headerToBytes function