Window opening refactor