Also fix a couple of bugs: - Tag sorting algorithm bug in Safari - Ensure subtag is removed when parent is removed