Now using pid to identify window, cleaned debug instructions