AI changed to interface to allow alternative implementations