Improvements to addClass window