Fixed bugs in the node implementation, and add options parameter. Issue: #415