Removed hard-coded reference to window