Code cleanup model to pgn