Make input/addUnit a pure function.