Changing window property to weak.
Fixing tidy build support (enable by defining TOUCHXMLUSETIDY as 1).