extend code with docs and comments
add substitution of {{IP|nodename}} macro