refactor processing function
refactor processing function again to readable format
refactor _onKeyUp function
refactoring in _render function