AI Related changes

Changes are not 100% completed