Re-wrote sort_unload

Now only removes sort node safely