Added methods for converting header to byte array

Still testing