refactoring javaScript
added remove & disable lastInput in inputSections