Clean up nodes, added parameters validation