Adding inputs double, will make tornado process them as a list for ex. [0,on]. Changed the checkbox_to_value function so that it always processes the last value in the list [0, --> on].

Also added to the hidden inputs to other inputs that i missed before.
Please test this one!