 # some user configuration settings.
 
 PuzzlePage = React.createClass
-    render: ->
-        if @state.puzzle == null
-            <div className="puzzle_container">
-              Loading puzzle...
-            </div>
-        else
-            <div className="puzzle_container">
-              <div className="puzzle_grid">
-                <table className="puzzle_grid_table">
-                  { @render_rows() }
-                </table>
-                <input type="button" value="Re-assign numbers" onClick={this.renumber} />
-                <input type="checkbox"
-                        defaultChecked={true}
-                        onChange={@toggleMaintainRotationalSymmetry} />
-                    Maintain rotational symmetry
-              </div>
-              <div style={{'border': '2px solid black'}}>
-                <EditableTextField
-                        defaultText={@state.initial_puzzle.across_clues}
-                        produceOp={(op) => @clueEdited('across', op)}
-                        ref="acrossClues" />
-              </div>
-              <div className="offline_mode">
-                <input type="checkbox"
-                        defaultChecked={false}
-                        onChange={@toggleOffline} />
-                    Offline mode
-              </div>
-            </div>
-
-    render_rows: ->
-        for row in [0 ... @state.puzzle.grid.length]
-            puzzle_row = @state.puzzle.grid[row]
-
-            <tr className="puzzle_grid_row" key={"tr-"+row}>
-                { @render_cells(row, puzzle_row) }
-            </tr>
-
-    render_cells: (row, puzzle_row) ->
-        for col in [0 ... puzzle_row.length]
-            do (col) =>
-                cell = puzzle_row[col]
-
-                <td onClick={() => @onCellClick(row, col)}
-                    key={"td-"+row+"-"+col}
-                    className={"puzzle_grid_cell " + @getCellClass(row, col)}>
-                {
-                    if cell.open
-                        <div>
-                          <div style={{position: 'relative', height: '100%', width: '100%'}}>
-                            <div className="cell_number">
-                                {if cell.number != null then cell.number else ""}
-                            </div>
-                          </div>
-                          <div className="cell_contents">
-                            {if cell.contents == "" then "\xA0" else cell.contents}
-                          </div>
-                        </div>
-                }
-                {
-                    if @doesCellHaveFieldOpen(row, col)
-                        <div style={{position: 'relative'}}>
-                          <div className="cellField">
-                            <input type="text" id="cellFieldInput"
-                                      ref={@onCellFieldCreate}
-                                      className="dont-bubble-keydown"
-                                      onKeyDown={@onCellFieldKeyPress} />
-                          </div>
-                        </div>
-                }
-                </td>
-
-    onCellFieldCreate: (field) ->
-        if field?
-            React.findDOMNode(field).focus()
-
     getInitialState: () ->
         puzzle: null
         

            else
                return

            @props.requestOp Ot.opEditCellValue grid_focus.row, grid_focus.col, name, value

            grid_focus.field_open = "none"
            @setState { grid_focus: grid_focus }

            grid_focus.field_open = "none"
            @setState { grid_focus: grid_focus }

    onCellFieldKeyPress: (event, row, col) ->
        v = event.target.value
        keyCode = event.keyCode

