code cleanup: use var + avoid global selectors