added udp ports and fixed up the way events declare bytes read
got rid of more old lua stuff, made sure stuff used constants better