Implement packet interface

Implement the packet interface to easily send and receive data.
Revert "Implement packet interface"

This reverts commit cf5ab29cf9f803c82d57aaa227f0729a1c3ef9e7.