Finished implementing AI