Refining code of Vanco -Civi 4.1.x