Window code improved.