Added function to get bits for all payloads and added some debugging output.