Added method to set window title.