Moved task window to its own handler