Remove createWindow function