Updated version, support for per window setting added.