Extract common bits about add window to a superclass