Modified signature of funtion addNode() and addNodeRandomly() to return the added node, instead of true/false. This makes sense for all add functions which take data as input