Edits to scope js