Implements categories collapse