Reorganization + additions to pgn handler