added ai package and moved relevant classes to it