Added unit-tests for preferences. Allowed "0" as a min value in
preferences