Refactored prepareTransmission(), removing malloc, redundant arrays, all he100_lib_test tests pass