Improved window test and validations.