lots of small fixes, added packet_in, added padding to functions, etc