Move rendering code