created centralized structure
    - automatically connect to main server
    - automatically choose new main server, if first one fail
reorder some defines
added trivial client
change default log level to 2
fix communication between client and server
fix `make install'