fullscreen code refactor