Add length to bitfield, change to struct, pass by pointer.