Full explanation of input.js file