Refactored code so that addInput can be called on any "input" type (button, select, input etc) and will dispatch to the correct helper method if needed.