Move Pgn code into format package