merge aaiyers MAVP fix, improve setting input_arrays and add tests

closes #36
closes #38