complete gui.
use pgn to display.
refractor code.