Experimental PGN output, some more cleanups to come. However PGN output is now functional