Extract input box into class