wrangling js files / scopes