Remove unnecessary indirection
Add window check (used at top level window.performance) for non-browser environment
Add client check before loading artpacks