Restructured handle_datagram
Merge pull request #13 from kree1/master

Restructured handle_datagram