moved most functions to functions.lisp, wrote some hex manipulation functions for future ipv6 support, other improvements