Made some constrains to the different set methods. Still need unit
tests.