Code commented to some extent. Also we now handle node failures