tidied some names and constants;
added note re. caching, but probably not important;
added make_packet function to avoid some boilerplate code for packet creation;
updated lookup function to send packet in one of the cases -- but this is still work in progress;