Repeat the input rows programatically instead of hard coded

Also add some titles to the inputs.