Speed optimizations and API cleanup.

Window has lazy properties fetched on demand. This allows optimize
"matches" and "state" calls.