Removed unnecessary function and updated comments.