added logging of request
moved hash of codes to top level
moved router definition to top level, directory and port now atoms
simplified server body