Adjustment to Window class, add comments