Remove unused $window and $document