Added multiple payload types to encoding utils