Better validation, fixed some bugs, handle cleanup for delete nodes