Fix issues in farmer

* Removed deprecated functions.

* Changed some default settings.

Change-Id: I02bb0fbb2083a54ddfea3e450aa352cd93fa6e22
(cherry picked from commit d6aee5f132dddf48b8ff102a166d22a2286c1090)