Broke out build_packet into the utility functions script.
Updated the documentation and refactored a few variable names.