Improve API for node management