moved ai classes to separate file