Clean up code of UDPTask