whitespace
Abstracting window
cleaning up dom dependency
more dom reference fixes