Do *all* the work on UDP! Not tested yet, nor is server implemented, but worked on it nonetheless.

Also changed the raw pointer type from a typedef to a data constructor for added type safety.