code cleanup, udp working,uservar working