Fix function handling for js
Add select_scope_down command