Remove some parts of code in the renderwindow and move window