Replace window with win

Enables minification; also allows us to substitute global for
window when working with node to get the same kind of effect.
AP can be replaced with A