Made adding and removing a varibale work.
Array now doesn't contain numbers, but objects {val: number}. This made storing the input value work.