Added automatic window clearing