Fixed warn issue. Fixes #3

Updated transmit function to return packet instead of undefined `warn`