removes unneeded hidden inputs.