Reorganize pgn-related stuff