replace window references to global references, simplify parseHolder