fix the broken handleInput consolidate update tree code
fix the broken handleInput
consolidate update tree code

jackrosenhauer/semantic-editor-js,joshmarinacci/semantic-editor-js,jackrosenhauer/semantic-editor-js,joshmarinacci/semantic-editor-js