Clean up error handling; and always remove nodes