Bug fix - ai type is now in ai component
Added some exceptions etc