Refactored datapacket