Cleaned smooth code to avoid redundant pointer.