Added lib_node
Refacotring: extract get_main_address, merge with lib_node.sh
Use node-id as hostname