Expand hierarchy when typing, collapse when empty (#59)