Refactors code to avoid the terrible 'hasattr' flagging of empty links, adds delete decision-making to help maintain balance