Finished encode, basic header

Header currently only has 2 bits (before encoding) representing index
of G