Manually merged Adithi's input module code.