Began implementing datagram server.
Cleaned up and simplified code.