Extracted AI to separate modules