diff --git a/qchess/build/exe.linux-x86_64-2.7.zip b/qchess/build/exe.linux-x86_64-2.7.zip
index f9c1f25a1ae72557e86b6499070f8cd8281dfb20..15edcaec4b3821453fb98d8a1b988d3efe9ef55b 100644
Binary files a/qchess/build/exe.linux-x86_64-2.7.zip and b/qchess/build/exe.linux-x86_64-2.7.zip differ
diff --git a/qchess/build/exe.win32-2.7.zip b/qchess/build/exe.win32-2.7.zip
index f795c0f613bbd84dc43f0e5def397d91b4a704ae..8c2950303f1a3c33b5c54e91383657ba878d29c2 100644
Binary files a/qchess/build/exe.win32-2.7.zip and b/qchess/build/exe.win32-2.7.zip differ
diff --git a/qchess/qchess.py b/qchess/qchess.py
index 427472cbd6769a127d5a49ca8eec9f1acb85cf8b..48ada318b773f629baffe39f6ea8692abba1e823 100755
--- a/qchess/qchess.py
+++ b/qchess/qchess.py
@@ -294,7 +294,7 @@ class Board():
 		#print "Moving " + str(x) + "," + str(y) + " to " + str(x2) + "," + str(y2) + "; possible_moves are " + str(self.possible_moves(piece))
 		
 		if not [x2,y2] in self.possible_moves(piece):
-			raise Exception("ILLEGAL move")
+			raise Exception("ILLEGAL move " + str(x2)+","+str(y2))
 		
 		self.grid[x][y] = None
 		taken = self.grid[x2][y2]
@@ -614,7 +614,7 @@ class Board():
 import subprocess
 import select
 import platform
-
+import re
 
 agent_timeout = -1.0 # Timeout in seconds for AI players to make moves
 			# WARNING: Won't work for windows based operating systems
@@ -666,7 +666,7 @@ class ExternalAgent(Player):
 		if self.p.stdout in ready:
 			#sys.stderr.write("Reading from " + str(self.p) + " 's stdout...\n")
 			try:
-				result = self.p.stdout.readline().strip("\r\n")
+				result = self.p.stdout.readline().strip(" \t\r\n")
 				#sys.stderr.write("Read \'" + result + "\' from " + str(self.p) + "\n")
 				return result
 			except: # Exception, e:
@@ -680,7 +680,8 @@ class ExternalAgent(Player):
 		line = self.get_response()
 		
 		try:
-			result = map(int, line.split(" "))
+			m = re.match("\s*(\d+)\s+(\d+)\s*", line)
+			result = map(int, [m.group(1), m.group(2)])
 		except:
 			raise Exception("GIBBERISH \"" + str(line) + "\"")
 		return result
@@ -696,7 +697,9 @@ class ExternalAgent(Player):
 		line = self.get_response()
 		
 		try:
-			result = map(int, line.split(" "))
+			m = re.match("\s*(\d+)\s+(\d+)\s*", line)
+			result = map(int, [m.group(1), m.group(2)])
+
 		except:
 			raise Exception("GIBBERISH \"" + str(line) + "\"")
 		return result
@@ -1898,7 +1901,7 @@ class GraphicsThread(StoppableThread):
 		#print "Test font"
 		pygame.font.Font(os.path.join(os.path.curdir, "data", "DejaVuSans.ttf"), 32).render("Hello", True,(0,0,0))
 
-		#create_images(grid_sz)
+		#load_images()
 		create_images(grid_sz)
 
 		"""
@@ -1929,7 +1932,7 @@ class GraphicsThread(StoppableThread):
 			pygame.display.flip()
 
 			for event in pygame.event.get():
-				if event.type == pygame.QUIT:
+				if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_q):
 					if isinstance(game, GameThread):
 						with game.lock:
 							game.final_result = ""
@@ -2604,4 +2607,4 @@ if __name__ == "__main__":
 		sys.exit(102)
 
 # --- main.py --- #
-# EOF - created from make on Thu Feb 28 23:49:16 WST 2013
+# EOF - created from make on Thu Mar 14 22:36:37 WST 2013
diff --git a/qchess/src/board.py b/qchess/src/board.py
index 8fbbaa044134db5f4c9fb40092e3cd838cbe1a16..5f75d399d6bbdb0d59b9cc57000bb9df1e777054 100644
--- a/qchess/src/board.py
+++ b/qchess/src/board.py
@@ -197,7 +197,7 @@ class Board():
 		#print "Moving " + str(x) + "," + str(y) + " to " + str(x2) + "," + str(y2) + "; possible_moves are " + str(self.possible_moves(piece))
 		
 		if not [x2,y2] in self.possible_moves(piece):
-			raise Exception("ILLEGAL move")
+			raise Exception("ILLEGAL move " + str(x2)+","+str(y2))
 		
 		self.grid[x][y] = None
 		taken = self.grid[x2][y2]
diff --git a/qchess/src/graphics.py b/qchess/src/graphics.py
index 041b137fd9cafc7d42f93d27f5b37aed7622b1ed..8d95db8c74223249cb2cafa074378cd5a1ee3534 100644
--- a/qchess/src/graphics.py
+++ b/qchess/src/graphics.py
@@ -59,7 +59,7 @@ class GraphicsThread(StoppableThread):
 			pygame.display.flip()
 
 			for event in pygame.event.get():
-				if event.type == pygame.QUIT:
+				if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_q):
 					if isinstance(game, GameThread):
 						with game.lock:
 							game.final_result = ""
diff --git a/qchess/src/player.py b/qchess/src/player.py
index 0cc56c2f9d57ea28fdf258f1dc90016c2e128e32..d0f6cfb8d8c66c16e989666759b933283cb97f4c 100644
--- a/qchess/src/player.py
+++ b/qchess/src/player.py
@@ -1,7 +1,7 @@
 import subprocess
 import select
 import platform
-
+import re
 
 agent_timeout = -1.0 # Timeout in seconds for AI players to make moves
 			# WARNING: Won't work for windows based operating systems
@@ -53,7 +53,7 @@ class ExternalAgent(Player):
 		if self.p.stdout in ready:
 			#sys.stderr.write("Reading from " + str(self.p) + " 's stdout...\n")
 			try:
-				result = self.p.stdout.readline().strip("\r\n")
+				result = self.p.stdout.readline().strip(" \t\r\n")
 				#sys.stderr.write("Read \'" + result + "\' from " + str(self.p) + "\n")
 				return result
 			except: # Exception, e:
@@ -67,7 +67,8 @@ class ExternalAgent(Player):
 		line = self.get_response()
 		
 		try:
-			result = map(int, line.split(" "))
+			m = re.match("\s*(\d+)\s+(\d+)\s*", line)
+			result = map(int, [m.group(1), m.group(2)])
 		except:
 			raise Exception("GIBBERISH \"" + str(line) + "\"")
 		return result
@@ -83,7 +84,9 @@ class ExternalAgent(Player):
 		line = self.get_response()
 		
 		try:
-			result = map(int, line.split(" "))
+			m = re.match("\s*(\d+)\s+(\d+)\s*", line)
+			result = map(int, [m.group(1), m.group(2)])
+
 		except:
 			raise Exception("GIBBERISH \"" + str(line) + "\"")
 		return result