Remove explicit dependency on window