Input fields and js

Changed the input fields and merged.