Move rendering code into DeckViewer.