fix-tracking remove unused self var, cache window ref