Added max-nodes option