Finished porting AI code and other non-graphical parts.  At first glance, they work.  But they still need to be analyzed further.