Couple of functions modified.