Constructor method updated.