Made some refinements