added new interface GameViewer for tracking game behavior, and some minor changes to existing code for clarity and simplicity.