removing unnecessary hidden inputs and variable