jsApp: init extract method refactor