Refactored Input area code to its own file