Add note about dependency on Set.
Remove unused code, add protection against circular parent graphs and diamond inheritance.