Update action.js

Many changes to make portable for editor. Still more to do.