Improved Debug Methods

Also begun work on AI