Optimizing button checks and slightly breaking windows as a result. They need to be rewritten, anyway.