Added window title changed event. Modified debugging.