Gearman class added and some house keeping