UDP (final?)

Fixed all visible bugs, seems to be working fine now.