Move window reference up to class

Not sure if you know you can do this or if it's a preference thing.

Thoughts? @qq99